<?php
    Class Cron_model extends CI_Model
    {
        public function __construct()
        {
          parent::__construct();
        }
       

       function listCron($search = false)
       {
          // retrieve all users except admin
          $this->db->select('*');
          $this->db->from('cron');          

          if(!empty($search))
            $this->db->like('message',$search);

          $query = $this->db->get();

          return $query->result();
       }
     
       function getLastUpdatedCron()
       {
          $this->db->select('*');
          $this->db->from('cron');
          $this->db->order_by('id','desc');

          $query = $this->db->get();

          return $query->row();
       }  
    }
?>
